"""
    Author:
    Date: 2019-04-04

    微信管理后台-产品管理
"""

from django.shortcuts import render

from entities import app_mgr
from utils import util

from .. import helpers
from .. helpers import gma_login_required


@gma_login_required
def index(request):
    """ 首页 """
    apps = app_mgr.get_app_list()
    channels = app_mgr.get_channel_list()

    # context
    context = helpers.build_context(request)
    context['apps'] = apps
    context['channels'] = channels
    return render(request, 'gma/app/app_home.html', context)


if __name__ == '__main__':
    print('ok')
